package ch02.classPath.Entry;

import java.io.IOException;

/**
 * 类路径的抽象类
 * 包含两个方法 readClass() 和 pringClassName
 * readClass() 用于读取 .class 文件
 * pringClassName 打印
 */
public abstract class Entry {
    public static final String pathListSeparator = System.getProperty("os.name").contains("Windows") ? ";" : ":";

    public abstract byte[] readClass(String className) throws IOException;

    public abstract String string();


    public static Entry createEntry(String path) throws ClassNotFoundException {
        if(path.contains("/")){
//            return new DirEntry(path);
        }else if (path.contains("*")){

        }else {
            return new DirEntry(path);
        }

        return null;
    }


    public static void main(String[] args) {
        System.out.println(pathListSeparator);


    }

}
